package com.miyuan.motan.client.controller;

import com.miyuan.motan.server.IServerService;
import com.weibo.api.motan.config.springsupport.annotation.MotanReferer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ClientController {


    @MotanReferer(group = "lyncc-motan-demo-rpc", directUrl = "127.0.0.1:8001")
    private IServerService serverService;

    @RequestMapping("/motan")
    public String sayHello() {
        return serverService.sayHello("motan");
    }
}